package com.starlink.model.util;

import com.starlink.model.dtomapper.MallPeripheryDetailDtoMapper;
import com.starlink.model.domain.MallPeripheryDetailDO;
import com.starlink.model.vo.MallPeripheryDetailVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class MallPeripheryDetailConvert {

    public static List<MallPeripheryDetailVO> buildMallPeripheryDetailVoList(List<MallPeripheryDetailDO> mallPeripheryDetailDOList) {
        if (CollectionUtils.isEmpty(mallPeripheryDetailDOList)) {
            return Lists.newArrayList();
        }
        List<MallPeripheryDetailVO> mallPeripheryDetailVOList = new ArrayList<>();
        for (MallPeripheryDetailDO mallPeripheryDetailDO : mallPeripheryDetailDOList) {
            mallPeripheryDetailVOList.add(MallPeripheryDetailDtoMapper.INSTANCE.do2VO(mallPeripheryDetailDO));
        }

        return mallPeripheryDetailVOList;
    }
}
